package com.may.wlrj.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.may.wlrj.services.OptAuthService;

@Controller
public class OptAuthController {
	private OptAuthService optauthService;
    @Autowired
    public void setOptAuthService(OptAuthService optauthService){
        this.optauthService = optauthService;
    }
    
    @RequestMapping(value = "/optAuthCheck",method = RequestMethod.POST,produces="application/json;charset=UTF-8;")
    public @ResponseBody String optAuthCheck(@RequestBody String objnode,HttpServletRequest request, HttpSession session) throws JsonProcessingException{
        //获取用户名和密码
    	System.out.println("---------------------->>>>optAuthCheck");
    	
        return optauthService.OptAuthCheck(objnode, session);
    }
}
